<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>App1976管理系统</title>
<!--                       CSS                       -->
<?php echo $this->load->view('admin/script_css');?>
</head>
<body>
<div id="body-wrapper">
  <!-- Wrapper for the radial gradient background -->
  <?php echo $this->load->view('admin/sidebar');?>
  <!-- End #sidebar -->
  <div id="main-content">
  
    <!-- Main Content Section with everything -->
    <?php echo $this->load->view('admin/top');?>
    <!-- End .shortcut-buttons-set -->
    <div class="clear"></div>
    <!-- End .clear -->
    <div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>115网盘解析程序设置</h3>
        <ul class="content-box-tabs">
          <!--li><a href="#tab1" class="default-tab">表格</a></li-->
          <!-- href must be unique and match the id of target div -->

        </ul>
        <div class="clear"></div>
      </div>
      
      <!-- End .content-box-header -->
      <div class="content-box-content">
      
        <div class="tab-content default-tab" id="tab1">
          <!-- 提示框 -->
          <div class="notification attention png_bg"> <a href="#" class="close"><img src="/resources/admin/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
      <div> 请谨慎操作！！操作不当会导致用户无法正常下载文件~！ </div>
    </div>
    </div><!-- 提示框 End -->

    <!--表格-->
        <?php foreach ($show as $row):?>
        
        <form action="<?php echo site_url("admin/home/monitor_update_go/$row->id");?>" method="post">
            <fieldset>
            <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --><!--small>请注意填写</small-->
           
           <p>
              <label>目标主机：</label>
              <input class="text-input medium-input datepicker" type="text" name="host" value="<?php echo $row->host;?>"/>
              <span class="input-notification success png_bg">填写正确</span>
           </p>
           
           <p>
              <label>version：</label>
              <input class="text-input small-input" type="text" name="version" value="<?php echo $row->version;?>"/>
              <span class="input-notification success png_bg">填写正确</span>
           </p>

            <p>
              <label>添加日期：</label>
              <input class="text-input small-input" type="text" name="uptime" value="<?php echo date('Y年n月d日 H时i分s秒',$row->date)?>" disabled="disabled"/>
              <span class="input-notification attention png_bg">只读模式，不可编辑</span>
            </p>

            <p>
              <label>演示地址：</label>
              <input class="text-input large-input" type="text" name="uptime" value="<?php echo $row->host;?>/?ct=upload_api&ac=get_pick_code_info&pickcode=dn05aatk&version=<?php echo $row->version;?>"/>
            </p>
    
            <p>
              <label>参数说明：</label>
              <span class="input-notification">提取码：pickcode=dn05aatk</span>
              <span class="input-notification">version：<?php echo $row->version;?></span>
            </p>
            
            <p>
              <label>cURL返回结果：</label>
            <?php 
             $apiUrl="$row->host/?ct=upload_api&ac=get_pick_code_info&pickcode=dn05aatk&version=$row->version";
			 $curlObj = curl_init();
			 curl_setopt($curlObj, CURLOPT_URL, $apiUrl);
			 curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
			 curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);
			 curl_setopt($curlObj, CURLOPT_HEADER, 0);
			 curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));
			 $response = curl_exec($curlObj);
			 curl_close($curlObj);
			 $json = json_decode($response);
			 //print_r($json);
			 echo '<br><br><br>电信地址：<br><br>'. $json->DownloadUrl[0]->Url;
			 echo '<br><br><br>网通地址：<br><br>'. $json->DownloadUrl[1]->Url;
			 echo '<br><br><br>返回状态：<br><br>'. $json->Message;
			 echo '<br><br><br> 哈 希 值：<br><br>'. $json->Sha1;
			 echo '<br><br><br> 文 件 名：<br><br>'. $json->FileName;
            ?>
            </p>
            <p></p><p></p>
 
            <p><input class="button" type="submit" name="submit" value="提 交" /></p>
            
            </fieldset>
            <div class="clear"></div>
            <!-- End .clear -->
          </form>
          <?php endforeach;?><!--表格 End-->

      </div>
      
      <!-- End .content-box-content -->
    </div>

    <!-- End .content-box -->

    
    <!-- Start Notifications -->
    <?php echo $this->load->view('admin/footer');?>
    <!-- End #footer -->
  </div>
  <!-- End #main-content -->
</div>
</body>
<!-- Download From www.exet.tk-->
</html>
